//4. 计算一个矩阵下三角元素的和
#include<stdio.h>
#define N 3
#define M 3
int main()
{
	int i,j,sum = 0;
	int a[N][M] = {{2,5,9},{3,5,7},{4,6,10}};
	for(i = 0; i < N ; i++)
		for(j = 0; j < M; j++)
		{
			if(i >= j)
				sum += a[i][j];
		}	
	printf("矩阵下三角元素的和为：%d\n",sum);
	return 0;
}
